//#include <m8c.h>        // part specific constants and macros
#include <math.h>

#define Sensor1Mask 0x01
#define Sensor2Mask 0x02
#define Sensor3Mask 0x04
#define Sensor4Mask 0x08
#define Sensor5Mask 0x10

#define NrSensors 5
#define MaxNrSensors 5

#define ScanMask 0x1F

typedef struct s_sht_data {
    unsigned char mask;
    int  temperature;
    char humidity;
    unsigned char  crc;
    unsigned char  valid;
              } s_tdata;


void s_Start(void);			// Funky use of capitals to be compliant with other PSOC libs
char s_do_measure(unsigned char Sensor);
int  s_getCurrentTemp(unsigned char Sensor);
unsigned char  s_getCurrentHumi(unsigned char Sensor);
char  s_getCurrentCRC(unsigned char Sensor);
unsigned char s_init(void);
unsigned char s_SetSensor(unsigned char Sensor);
void s_crc_init(void);
unsigned char s_softreset(void);
char s_GetDeviceCount(void);
//void s_crc_shuffle_byte(unsigned char input);
